package com.framework.config;

import org.apache.solr.client.solrj.SolrClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.solr.core.SolrTemplate;

/**
 * @ClassName SolrConfig
 * @Description Solr配置类
 * @Date 2020/10/10 11:22
 * Create By Renbowen
 */
@Configuration
public class SolrConfig {

    @Autowired
    SolrClient solrClient;

    @Bean
    public SolrTemplate getSolrTemplate() {
        return new SolrTemplate(solrClient);
    }
}